import request from '@/config/axios'

// 质检平台-项目管理 VO
export interface ProjectManagemenrVO {
  id: number // 主键id
  name: string // 项目名称
  startTime: Date // 项目起始时间
  endTime: Date // 项目截止时间
  contractAmount: number // 合同金额; 万元
  firstpartyId: number // 甲方单位Id
  contractNum: string // 合同编号
  projectManager: string // 项目管理员
  orgIds: string // 机构id,多个用“;”隔开
  thirdpartyId: number // 第三方人员id
}

// 质检平台-项目管理 API
export const ProjectManagemenrApi = {
  // 查询质检平台-项目管理分页
  getProjectManagemenrPage: async (params: any) => {
    return await request.get({ url: `/qis/project-managemenr/page`, params })
  },

  // 查询质检平台-项目管理详情
  getProjectManagemenr: async (id: number) => {
    return await request.get({ url: `/qis/project-managemenr/get?id=` + id })
  },

  // 新增质检平台-项目管理
  createProjectManagemenr: async (data: ProjectManagemenrVO) => {
    return await request.post({ url: `/qis/project-managemenr/create`, data })
  },

  // 修改质检平台-项目管理
  updateProjectManagemenr: async (data: ProjectManagemenrVO) => {
    return await request.put({ url: `/qis/project-managemenr/update`, data })
  },

  // 删除质检平台-项目管理
  deleteProjectManagemenr: async (id: number) => {
    return await request.delete({ url: `/qis/project-managemenr/delete?ids=` + id })
  },

  // 导出质检平台-项目管理 Excel
  exportProjectManagemenr: async (params) => {
    return await request.download({ url: `/qis/project-managemenr/export-excel`, params })
  },


  // 获取甲方单位树形结构
  getTreeListApi :async ()=>{
    return await request.get({ url: `/qis/first-party/tree` })
  },

  getProjectManagemenrPage1: async (params: any) => {
    return await request.get({ url: `/qis/project-managemenr/page-for-sample`, params })
  },
  
}
